Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more MIDI CCs #122

Merged
merged 2 commits into from
Apr 20, 2022
Merged

Support more MIDI CCs #122

merged 2 commits into from
Apr 20, 2022

Conversation

probonopd
Copy link
Owner

@probonopd probonopd commented Apr 20, 2022

Add support for MIDI CCs

  • 10 = Pan
  • 71 = Resonance
  • 74 = Frequency Cutoff
  • 91 = Reverb Send
  • 94 = Detune Level

Closes #121

@probonopd
Copy link
Owner Author

probonopd commented Apr 20, 2022

I think I was able to implement them.

Except for 91 = Reverb Level, because there is no m_pSynthesizer->SetReverbLevel like for the other parameters. Probably we have to implement it in minidexed.cpp. Since this is a global (non-TG) parameter I was not sure how to do this. Maybe @rsta2 can point me in the right direction?

@rsta2
Copy link
Contributor

rsta2 commented Apr 20, 2022

Regarding 91 (Reverb Level) I'm honestly not sure. Perhaps it's better to use TGParameterReverbSend instead, because it is local to the TG, and let Reverb Level only be modified from the UI. You can change TGParameterReverbSend from mididevice.cpp like that:

m_pSynthesizer->SetTGParameter (CMiniDexed::TGParameterReverbSend, nValue,  nTG);

Some parameters are not in the MIDI range 0..127. They must be mapped to that range.

@probonopd
Copy link
Owner Author

Perhaps it's better to use TGParameterReverbSend instead, because it is local to the TG

Yes, it'd be more consistent with the other params indeed.

Some parameters are not in the MIDI range 0..127. They must be mapped to that range.

nReverbSend=constrain((int)nReverbSend,0,99);

should take care of that, right?

@probonopd probonopd merged commit fe39d8d into main Apr 20, 2022
@probonopd probonopd deleted the midi-cc branch April 20, 2022 18:48
@rsta2
Copy link
Contributor

rsta2 commented Apr 21, 2022

constrain() only checks, if the parameter is in the given range, but does not map it. To map from one range (MIDI) to another use:

nReverbSend = (unsigned) maplong ((long) nReverbSend, 0, 127, 0, 99);

@probonopd
Copy link
Owner Author

10 = Pan: 0-127
71 = Resonance: 0-99
74 = Frequency Cutoff: 0-99
91 = Reverb Send: 0-99
94 = Detune Level: -99-99

probonopd added a commit that referenced this pull request Apr 21, 2022
@probonopd probonopd mentioned this pull request Apr 21, 2022
probonopd added a commit that referenced this pull request Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support pan, cutoff frequency/resonance and reverb level changes using standard Midi CCs
2 participants